﻿#ifndef UDPCODEC_HEARTBEAT_H
#define UDPCODEC_HEARTBEAT_H

#include <qobject.h>
#include "ObjAutoInject.h"
#include "UdpCodecBase.h"

#include "LogSaver.h"

class RegisterCenter_Device;
class Mapper_Test_RTT;
class UdpCodec_HeartBeat : public QObject,public ObjAutoInject,public UdpCodecBase
{
  Q_OBJECT
/*
 * 载荷直接填入mems数据解析器
*/
private://dependency
  RegisterCenter_Device* registerCenter_Device=Q_NULLPTR;
  Mapper_Test_RTT* mapper_Test_RTT = Q_NULLPTR;
  LogSaver* logSaver=LogSaver::getLogSaver();
public:
  explicit UdpCodec_HeartBeat();
  virtual ~UdpCodec_HeartBeat();
public:
  virtual DataPackage_UdpCodec* decode(DataPackage_UdpCodec* dataPackageInfo_Device)override;
public://geter and seter
  RegisterCenter_Device* getRegisterCenter_Device() const;
  UdpCodec_HeartBeat* setRegisterCenter_Device(RegisterCenter_Device* const registerCenter_Device);
  Mapper_Test_RTT* getMapper_Test_RTT() const;
  UdpCodec_HeartBeat* setMapper_Test_RTT(Mapper_Test_RTT* const mapper_Test_RTT);
public:
  virtual void objectAutoInjection(QHash<QString, QObject *> *objMap) override;
};

#endif // UDPCODEC_HEARTBEAT_H
